package com.xyc.gulimall.product.vo;

import com.xyc.gulimall.product.entity.SkuImagesEntity;
import com.xyc.gulimall.product.entity.SkuInfoEntity;
import com.xyc.gulimall.product.entity.SpuInfoDescEntity;
import lombok.Data;

import java.util.List;

@Data
public class SkuItemVo {
    //1、sku基本信息获取 pms_sku_info
    private SkuInfoEntity info;

    //有货/无货
    private boolean hasStock = true;

    //2、sku的图片信息 pms_sku_images
    private List<SkuImagesEntity> images;

    //3、获取spu的销售属性组合
    private List<SkuItemSaleAttrVo> saleAttr;

    //4、获取spu的介绍
    private SpuInfoDescEntity desc;

    //5、获取spu规格参数信息
    private List<SpuItemAttrGroupVo> groupAttrs;

    //6、当前商品的秒杀信息
    private SeckillInfoVo seckillInfo;

    @Data
    public static class SkuItemSaleAttrVo {
        private Long attrId;
        private String attrName;
        private List<AttrValueWithSkuIdVo> attrValues;
    }

    @Data
    public static class SpuItemAttrGroupVo {
        private String groupName;
        private List<SpuBaseAttrVo> attrs;
    }

    @Data
    public static class SpuBaseAttrVo {
        private String attrName;
        private String attrValue;
    }
}
